home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-2.iso / Files II / Prog / S / Simple Sockets 1.0.1.sit / Simple Sockets 1.0.1 ƒ / MacTCP Headers ƒ / Universal Headers / MacTCP Headers / dnr.c - orig < prev    next >
MacBinary  |  1995-03-09  |  10.0 KB  |  [TEXT/MMCC]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: dnr.c - orig

ConfidenceProgramDetectionMatch TypeSupport
20% dexvert Blazing Paddles (image/blazingPaddles) fileSize Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Thu Mar 9 09:54:22 1995, modified Thu Mar 9 09:54:22 1995, creator 'MMCC', type ASCII, 9599 bytes "dnr.c - orig" , at 0x25ff 410 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MMCC]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0c 64 6e 72 2e 63 20 | 2d 20 6f 72 69 67 00 00 |..dnr.c |- orig..|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 4d 43 | 43 00 00 00 00 00 00 00 |.TEXTMMC|C.......|
|00000050| 00 00 00 00 00 25 7f 00 | 00 01 9a ab 84 c7 1e ab |.....%..|........|
|00000060| 84 c7 1e 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 d5 32 00 00 |........|.....2..|
|00000080| 2f 2a 20 09 0d 0d 09 46 | 69 6c 65 3a 09 09 44 4e |/* ....F|ile:..DN|
|00000090| 52 2e 63 20 0d 09 0d 09 | 43 6f 6e 74 61 69 6e 73 |R.c ....|Contains|
|000000a0| 3a 09 44 4e 52 20 6c 69 | 62 72 61 72 79 20 66 6f |:.DNR li|brary fo|
|000000b0| 72 20 4d 50 57 0d 0d 20 | 20 09 43 6f 70 79 72 69 |r MPW.. | .Copyri|
|000000c0| 67 68 74 3a 09 a9 20 31 | 39 38 39 2d 31 39 39 35 |ght:.. 1|989-1995|
|000000d0| 20 62 79 20 41 70 70 6c | 65 20 43 6f 6d 70 75 74 | by Appl|e Comput|
|000000e0| 65 72 2c 20 49 6e 63 2e | 2c 20 61 6c 6c 20 72 69 |er, Inc.|, all ri|
|000000f0| 67 68 74 73 20 72 65 73 | 65 72 76 65 64 0d 0d 09 |ghts res|erved...|
|00000100| 56 65 72 73 69 6f 6e 3a | 09 54 65 63 68 6e 6f 6c |Version:|.Technol|
|00000110| 6f 67 79 3a 09 09 09 4e | 65 74 77 6f 72 6b 69 6e |ogy:...N|etworkin|
|00000120| 67 0d 09 09 09 09 50 61 | 63 6b 61 67 65 3a 09 09 |g.....Pa|ckage:..|
|00000130| 09 55 73 65 20 77 69 74 | 68 20 4d 61 63 54 43 50 |.Use wit|h MacTCP|
|00000140| 20 32 2e 30 2e 36 20 61 | 6e 64 20 74 68 65 20 55 | 2.0.6 a|nd the U|
|00000150| 6e 69 76 65 72 73 61 6c | 0d 09 09 09 09 09 09 09 |niversal|........|
|00000160| 09 09 49 6e 74 65 72 66 | 61 63 65 73 20 32 2e 31 |..Interf|aces 2.1|
|00000170| 62 31 09 0d 09 09 0d 09 | 43 68 61 6e 67 65 20 48 |b1......|Change H|
|00000180| 69 73 74 6f 72 79 20 28 | 6d 6f 73 74 20 72 65 63 |istory (|most rec|
|00000190| 65 6e 74 20 66 69 72 73 | 74 29 3a 0d 09 09 3c 33 |ent firs|t):...<3|
|000001a0| 3e 09 20 31 2f 32 33 2f | 39 35 09 72 72 6b 20 20 |>. 1/23/|95.rrk |
|000001b0| 09 69 6d 70 6c 65 6d 65 | 6e 74 65 64 20 75 73 65 |.impleme|nted use|
|000001c0| 20 6f 66 20 75 6e 69 76 | 65 72 73 61 6c 20 70 72 | of univ|ersal pr|
|000001d0| 6f 63 70 74 72 73 0d 09 | 09 20 09 09 09 09 09 09 |ocptrs..|. ......|
|000001e0| 43 68 61 6e 67 65 64 20 | 73 65 6c 65 63 74 6f 72 |Changed |selector|
|000001f0| 20 6e 61 6d 65 20 48 49 | 4e 46 4f 20 74 6f 20 48 | name HI|NFO to H|
|00000200| 58 49 4e 46 4f 0d 09 09 | 20 09 09 09 09 09 09 64 |XINFO...| ......d|
|00000210| 75 65 20 74 6f 20 63 6f | 6e 66 6c 69 63 74 20 6f |ue to co|nflict o|
|00000220| 66 20 6e 61 6d 65 20 69 | 6e 20 4d 61 63 54 43 50 |f name i|n MacTCP|
|00000230| 20 68 65 61 64 65 72 0d | 09 09 20 09 09 09 09 09 | header.|.. .....|
|00000240| 09 52 65 6d 6f 76 65 64 | 20 75 73 65 20 6f 66 20 |.Removed| use of |
|00000250| 54 72 61 70 41 76 61 69 | 6c 61 62 6c 65 20 61 6e |TrapAvai|lable an|
|00000260| 64 20 65 78 63 68 61 6e | 67 65 64 0d 09 09 20 09 |d exchan|ged... .|
|00000270| 09 09 09 09 09 66 6f 72 | 20 74 68 65 20 54 72 61 |.....for| the Tra|
|00000280| 70 45 78 69 73 74 73 20 | 63 61 6c 6c 2e 0d 09 09 |pExists |call....|
|00000290| 09 09 09 09 09 09 43 68 | 61 6e 67 65 64 20 73 79 |......Ch|anged sy|
|000002a0| 6d 62 6f 6c 20 63 6f 64 | 65 48 61 6e 64 6c 65 20 |mbol cod|eHandle |
|000002b0| 74 6f 20 67 44 4e 52 43 | 6f 64 65 48 6e 64 6c 0d |to gDNRC|odeHndl.|
|000002c0| 09 09 09 09 09 09 09 09 | 43 68 61 6e 67 65 64 20 |........|Changed |
|000002d0| 73 79 6d 62 6f 6c 20 64 | 6e 72 20 74 6f 20 67 44 |symbol d|nr to gD|
|000002e0| 4e 52 43 6f 64 65 50 74 | 72 0d 09 46 75 72 74 68 |NRCodePt|r..Furth|
|000002f0| 65 72 20 6d 6f 64 69 66 | 69 63 61 74 69 6f 6e 73 |er modif|ications|
|00000300| 20 62 79 20 53 74 65 76 | 65 20 46 61 6c 6b 65 6e | by Stev|e Falken|
|00000310| 62 75 72 67 2c 20 41 70 | 70 6c 65 20 4d 61 63 44 |burg, Ap|ple MacD|
|00000320| 54 53 20 38 2f 39 31 0d | 09 4d 6f 64 69 66 69 63 |TS 8/91.|.Modific|
|00000330| 61 74 69 6f 6e 73 20 62 | 79 20 4a 69 6d 20 4d 61 |ations b|y Jim Ma|
|00000340| 74 74 68 65 77 73 2c 20 | 44 61 72 74 6d 6f 75 74 |tthews, |Dartmout|
|00000350| 68 20 43 6f 6c 6c 65 67 | 65 2c 20 35 2f 39 31 0d |h Colleg|e, 5/91.|
|00000360| 0d 09 0d 2a 2f 0d 0d 23 | 69 66 6e 64 65 66 20 5f |...*/..#|ifndef _|
|00000370| 5f 4f 53 55 54 49 4c 53 | 5f 5f 0d 23 69 6e 63 6c |_OSUTILS|__.#incl|
|00000380| 75 64 65 20 3c 4f 53 55 | 74 69 6c 73 2e 68 3e 0d |ude <OSU|tils.h>.|
|00000390| 23 65 6e 64 69 66 0d 0d | 23 69 66 6e 64 65 66 20 |#endif..|#ifndef |
|000003a0| 5f 5f 45 52 52 4f 52 53 | 5f 5f 0d 23 69 6e 63 6c |__ERRORS|__.#incl|
|000003b0| 75 64 65 20 3c 45 72 72 | 6f 72 73 2e 68 3e 0d 23 |ude <Err|ors.h>.#|
|000003c0| 65 6e 64 69 66 0d 0d 23 | 69 66 6e 64 65 66 20 5f |endif..#|ifndef _|
|000003d0| 5f 46 49 4c 45 53 5f 5f | 0d 23 69 6e 63 6c 75 64 |_FILES__|.#includ|
|000003e0| 65 20 3c 46 69 6c 65 73 | 2e 68 3e 0d 23 65 6e 64 |e <Files|.h>.#end|
|000003f0| 69 66 0d 0d 23 69 66 6e | 64 65 66 20 5f 5f 52 45 |if..#ifn|def __RE|
|00000400| 53 4f 55 52 43 45 53 5f | 5f 0d 23 69 6e 63 6c 75 |SOURCES_|_.#inclu|
|00000410| 64 65 20 3c 52 65 73 6f | 75 72 63 65 73 2e 68 3e |de <Reso|urces.h>|
|00000420| 0d 23 65 6e 64 69 66 0d | 0d 23 69 66 6e 64 65 66 |.#endif.|.#ifndef|
|00000430| 20 5f 5f 4d 45 4d 4f 52 | 59 5f 5f 0d 23 69 6e 63 | __MEMOR|Y__.#inc|
|00000440| 6c 75 64 65 20 3c 4d 65 | 6d 6f 72 79 2e 68 3e 0d |lude <Me|mory.h>.|
|00000450| 23 65 6e 64 69 66 0d 0d | 23 69 66 6e 64 65 66 20 |#endif..|#ifndef |
|00000460| 5f 5f 54 52 41 50 53 5f | 5f 0d 23 69 6e 63 6c 75 |__TRAPS_|_.#inclu|
|00000470| 64 65 20 3c 54 72 61 70 | 73 2e 68 3e 0d 23 65 6e |de <Trap|s.h>.#en|
|00000480| 64 69 66 0d 0d 23 69 66 | 6e 64 65 66 20 5f 5f 47 |dif..#if|ndef __G|
|00000490| 45 53 54 41 4c 54 45 51 | 55 5f 5f 0d 23 69 6e 63 |ESTALTEQ|U__.#inc|
|000004a0| 6c 75 64 65 20 3c 47 65 | 73 74 61 6c 74 45 71 75 |lude <Ge|staltEqu|
|000004b0| 2e 68 3e 0d 23 65 6e 64 | 69 66 0d 0d 23 69 66 6e |.h>.#end|if..#ifn|
|000004c0| 64 65 66 20 5f 5f 46 4f | 4c 44 45 52 53 5f 5f 0d |def __FO|LDERS__.|
|000004d0| 23 69 6e 63 6c 75 64 65 | 20 3c 46 6f 6c 64 65 72 |#include| <Folder|
|000004e0| 73 2e 68 3e 0d 23 65 6e | 64 69 66 0d 0d 23 69 66 |s.h>.#en|dif..#if|
|000004f0| 6e 64 65 66 20 5f 5f 54 | 4f 4f 4c 55 54 49 4c 53 |ndef __T|OOLUTILS|
|00000500| 5f 5f 0d 23 69 6e 63 6c | 75 64 65 20 3c 54 6f 6f |__.#incl|ude <Too|
|00000510| 6c 55 74 69 6c 73 2e 68 | 3e 0d 23 65 6e 64 69 66 |lUtils.h|>.#endif|
|00000520| 0d 0d 0d 23 69 66 6e 64 | 65 66 20 5f 5f 4d 41 43 |...#ifnd|ef __MAC|
|00000530| 54 43 50 5f 5f 0d 23 69 | 6e 63 6c 75 64 65 20 22 |TCP__.#i|nclude "|
|00000540| 4d 61 63 54 43 50 2e 68 | 22 0d 23 65 6e 64 69 66 |MacTCP.h|".#endif|
|00000550| 0d 0d 23 69 66 6e 64 65 | 66 20 5f 5f 41 44 44 52 |..#ifnde|f __ADDR|
|00000560| 45 53 53 58 4c 41 54 49 | 4f 4e 5f 5f 0d 23 69 6e |ESSXLATI|ON__.#in|
|00000570| 63 6c 75 64 65 20 22 41 | 64 64 72 65 73 73 58 6c |clude "A|ddressXl|
|00000580| 61 74 69 6f 6e 2e 68 22 | 0d 23 65 6e 64 69 66 0d |ation.h"|.#endif.|
|00000590| 0d 2f 2f 20 74 68 69 6e | 6b 20 43 20 63 6f 6d 70 |.// thin|k C comp|
|000005a0| 61 74 69 62 69 6c 69 74 | 79 20 73 74 75 66 66 0d |atibilit|y stuff.|
|000005b0| 0d 23 69 66 6e 64 65 66 | 09 5f 47 65 73 74 61 6c |.#ifndef|._Gestal|
|000005c0| 74 44 69 73 70 61 74 63 | 68 0d 23 64 65 66 69 6e |tDispatc|h.#defin|
|000005d0| 65 09 5f 47 65 73 74 61 | 6c 74 44 69 73 70 61 74 |e._Gesta|ltDispat|
|000005e0| 63 68 09 5f 47 65 73 74 | 61 6c 74 0d 23 65 6e 64 |ch._Gest|alt.#end|
|000005f0| 69 66 0d 0d 0d 2f 2a 20 | 52 52 4b 20 4d 6f 64 69 |if.../* |RRK Modi|
|00000600| 66 69 63 61 74 69 6f 6e | 20 31 2f 39 35 20 2d 20 |fication| 1/95 - |
|00000610| 63 6f 6d 6d 65 6e 74 69 | 6e 67 20 6f 75 74 20 74 |commenti|ng out t|
|00000620| 68 65 20 66 6f 6c 6c 6f | 77 69 6e 67 20 64 65 66 |he follo|wing def|
|00000630| 69 6e 65 73 20 61 73 20 | 74 68 65 79 20 61 72 65 |ines as |they are|
|00000640| 0d 09 64 65 66 69 6e 65 | 64 20 69 6e 20 74 68 65 |..define|d in the|
|00000650| 20 44 4e 52 43 61 6c 6c | 73 2e 68 20 68 65 61 64 | DNRCall|s.h head|
|00000660| 65 72 20 66 69 6c 65 0d | 2a 2f 0d 0d 76 6f 69 64 |er file.|*/..void|
|00000670| 20 47 65 74 53 79 73 74 | 65 6d 46 6f 6c 64 65 72 | GetSyst|emFolder|
|00000680| 28 73 68 6f 72 74 20 2a | 76 52 65 66 4e 75 6d 50 |(short *|vRefNumP|
|00000690| 2c 20 6c 6f 6e 67 20 2a | 64 69 72 49 44 50 29 3b |, long *|dirIDP);|
|000006a0| 0d 76 6f 69 64 20 47 65 | 74 43 50 61 6e 65 6c 46 |.void Ge|tCPanelF|
|000006b0| 6f 6c 64 65 72 28 73 68 | 6f 72 74 20 2a 76 52 65 |older(sh|ort *vRe|
|000006c0| 66 4e 75 6d 50 2c 20 6c | 6f 6e 67 20 2a 64 69 72 |fNumP, l|ong *dir|
|000006d0| 49 44 50 29 3b 0d 73 68 | 6f 72 74 20 53 65 61 72 |IDP);.sh|ort Sear|
|000006e0| 63 68 46 6f 6c 64 65 72 | 46 6f 72 44 4e 52 50 28 |chFolder|ForDNRP(|
|000006f0| 6c 6f 6e 67 20 74 61 72 | 67 65 74 54 79 70 65 2c |long tar|getType,|
|00000700| 20 6c 6f 6e 67 20 74 61 | 72 67 65 74 43 72 65 61 | long ta|rgetCrea|
|00000710| 74 6f 72 2c 20 73 68 6f | 72 74 20 76 52 65 66 4e |tor, sho|rt vRefN|
|00000720| 75 6d 2c 20 6c 6f 6e 67 | 20 64 69 72 49 44 29 3b |um, long| dirID);|
|00000730| 0d 73 68 6f 72 74 20 4f | 70 65 6e 4f 75 72 52 46 |.short O|penOurRF|
|00000740| 28 76 6f 69 64 29 3b 0d | 73 68 6f 72 74 09 4e 75 |(void);.|short.Nu|
|00000750| 6d 54 6f 6f 6c 62 6f 78 | 54 72 61 70 73 28 76 6f |mToolbox|Traps(vo|
|00000760| 69 64 29 3b 0d 54 72 61 | 70 54 79 70 65 09 47 65 |id);.Tra|pType.Ge|
|00000770| 74 54 72 61 70 54 79 70 | 65 28 73 68 6f 72 74 20 |tTrapTyp|e(short |
|00000780| 74 68 65 54 72 61 70 29 | 3b 0d 42 6f 6f 6c 65 61 |theTrap)|;.Boolea|
|00000790| 6e 20 54 72 61 70 45 78 | 69 73 74 73 28 73 68 6f |n TrapEx|ists(sho|
|000007a0| 72 74 20 74 68 65 54 72 | 61 70 29 3b 0d 0d 73 74 |rt theTr|ap);..st|
|000007b0| 61 74 69 63 20 48 61 6e | 64 6c 65 20 09 09 09 67 |atic Han|dle ...g|
|000007c0| 44 4e 52 43 6f 64 65 48 | 6e 64 6c 20 3d 20 6e 69 |DNRCodeH|ndl = ni|
|000007d0| 6c 3b 0d 73 74 61 74 69 | 63 20 50 72 6f 63 50 74 |l;.stati|c ProcPt|
|000007e0| 72 09 09 09 67 44 4e 52 | 43 6f 64 65 50 74 72 20 |r...gDNR|CodePtr |
|000007f0| 3d 20 6e 69 6c 3b 0d 0d | 2f 2a 09 43 68 65 63 6b |= nil;..|/*.Check|
|00000800| 20 74 68 65 20 62 69 74 | 73 20 6f 66 20 61 20 74 | the bit|s of a t|
|00000810| 72 61 70 20 6e 75 6d 62 | 65 72 20 74 6f 20 64 65 |rap numb|er to de|
|00000820| 74 65 72 6d 69 6e 65 20 | 69 74 73 20 74 79 70 65 |termine |its type|
|00000830| 2e 20 2a 2f 0d 0d 2f 2a | 20 49 6e 69 74 47 72 61 |. */../*| InitGra|
|00000840| 66 20 69 73 20 61 6c 77 | 61 79 73 20 69 6d 70 6c |f is alw|ays impl|
|00000850| 65 6d 65 6e 74 65 64 20 | 28 74 72 61 70 20 24 41 |emented |(trap $A|
|00000860| 38 36 45 29 2e 20 20 49 | 66 20 74 68 65 20 74 72 |86E). I|f the tr|
|00000870| 61 70 20 74 61 62 6c 65 | 20 69 73 20 62 69 67 0d |ap table| is big.|
|00000880| 2a 2a 20 65 6e 6f 75 67 | 68 2c 20 74 72 61 70 20 |** enoug|h, trap |
|00000890| 24 41 41 36 45 20 77 69 | 6c 6c 20 61 6c 77 61 79 |$AA6E wi|ll alway|
|000008a0| 73 20 70 6f 69 6e 74 20 | 74 6f 20 65 69 74 68 65 |s point |to eithe|
|000008b0| 72 20 55 6e 69 6d 70 6c | 65 6d 65 6e 74 65 64 20 |r Unimpl|emented |
|000008c0| 6f 72 20 73 6f 6d 65 20 | 6f 74 68 65 72 0d 2a 2a |or some |other.**|
|000008d0| 20 74 72 61 70 2c 20 62 | 75 74 20 77 69 6c 6c 20 | trap, b|ut will |
|000008e0| 6e 65 76 65 72 20 62 65 | 20 74 68 65 20 73 61 6d |never be| the sam|
|000008f0| 65 20 61 73 20 49 6e 69 | 74 47 72 61 66 2e 20 20 |e as Ini|tGraf. |
|00000900| 54 68 75 73 2c 20 79 6f | 75 20 63 61 6e 20 63 68 |Thus, yo|u can ch|
|00000910| 65 63 6b 20 74 68 65 20 | 73 69 7a 65 0d 2a 2a 20 |eck the |size.** |
|00000920| 6f 66 20 74 68 65 20 74 | 72 61 70 20 74 61 62 6c |of the t|rap tabl|
|00000930| 65 20 62 79 20 61 73 6b | 69 6e 67 20 69 66 20 74 |e by ask|ing if t|
|00000940| 68 65 20 61 64 64 72 65 | 73 73 20 6f 66 20 74 72 |he addre|ss of tr|
|00000950| 61 70 20 24 41 38 36 45 | 20 69 73 20 74 68 65 20 |ap $A86E| is the |
|00000960| 73 61 6d 65 20 61 73 0d | 2a 2a 20 24 41 41 36 45 |same as.|** $AA6E|
|00000970| 2e 20 2a 2f 0d 0d 23 70 | 72 61 67 6d 61 20 73 65 |. */..#p|ragma se|
|00000980| 67 6d 65 6e 74 20 55 74 | 69 6c 4d 61 69 6e 0d 73 |gment Ut|ilMain.s|
|00000990| 68 6f 72 74 09 4e 75 6d | 54 6f 6f 6c 62 6f 78 54 |hort.Num|ToolboxT|
|000009a0| 72 61 70 73 28 76 6f 69 | 64 29 0d 7b 0d 09 69 66 |raps(voi|d).{..if|
|000009b0| 20 28 4e 47 65 74 54 72 | 61 70 41 64 64 72 65 73 | (NGetTr|apAddres|
|000009c0| 73 28 5f 49 6e 69 74 47 | 72 61 66 2c 20 54 6f 6f |s(_InitG|raf, Too|
|000009d0| 6c 54 72 61 70 29 20 3d | 3d 20 4e 47 65 74 54 72 |lTrap) =|= NGetTr|
|000009e0| 61 70 41 64 64 72 65 73 | 73 28 30 78 41 41 36 45 |apAddres|s(0xAA6E|
|000009f0| 2c 20 54 6f 6f 6c 54 72 | 61 70 29 29 0d 09 09 72 |, ToolTr|ap))...r|
|00000a00| 65 74 75 72 6e 28 30 78 | 32 30 30 29 3b 0d 09 65 |eturn(0x|200);..e|
|00000a10| 6c 73 65 0d 09 09 72 65 | 74 75 72 6e 28 30 78 34 |lse...re|turn(0x4|
|00000a20| 30 30 29 3b 0d 7d 0d 0d | 23 70 72 61 67 6d 61 20 |00);.}..|#pragma |
|00000a30| 73 65 67 6d 65 6e 74 20 | 55 74 69 6c 4d 61 69 6e |segment |UtilMain|
|00000a40| 0d 54 72 61 70 54 79 70 | 65 09 47 65 74 54 72 61 |.TrapTyp|e.GetTra|
|00000a50| 70 54 79 70 65 28 73 68 | 6f 72 74 20 74 68 65 54 |pType(sh|ort theT|
|00000a60| 72 61 70 29 0d 7b 0d 09 | 2f 2a 20 4f 53 20 74 72 |rap).{..|/* OS tr|
|00000a70| 61 70 73 20 73 74 61 72 | 74 20 77 69 74 68 20 41 |aps star|t with A|
|00000a80| 30 2c 20 54 6f 6f 6c 20 | 77 69 74 68 20 41 38 20 |0, Tool |with A8 |
|00000a90| 6f 72 20 41 41 2e 20 2a | 2f 0d 09 69 66 20 28 28 |or AA. *|/..if ((|
|00000aa0| 74 68 65 54 72 61 70 20 | 26 20 30 78 30 38 30 30 |theTrap |& 0x0800|
|00000ab0| 29 20 3d 3d 20 30 29 09 | 09 09 09 09 2f 2a 20 70 |) == 0).|..../* p|
|00000ac0| 65 72 20 44 2e 41 2e 20 | 2a 2f 0d 09 09 72 65 74 |er D.A. |*/...ret|
|00000ad0| 75 72 6e 28 4f 53 54 72 | 61 70 29 3b 0d 09 65 6c |urn(OSTr|ap);..el|
|00000ae0| 73 65 0d 09 09 72 65 74 | 75 72 6e 28 54 6f 6f 6c |se...ret|urn(Tool|
|00000af0| 54 72 61 70 29 3b 0d 7d | 0d 0d 42 6f 6f 6c 65 61 |Trap);.}|..Boolea|
|00000b00| 6e 20 54 72 61 70 45 78 | 69 73 74 73 28 73 68 6f |n TrapEx|ists(sho|
|00000b10| 72 74 20 74 68 65 54 72 | 61 70 29 0d 7b 0d 09 54 |rt theTr|ap).{..T|
|00000b20| 72 61 70 54 79 70 65 09 | 74 68 65 54 72 61 70 54 |rapType.|theTrapT|
|00000b30| 79 70 65 3b 0d 0d 09 74 | 68 65 54 72 61 70 54 79 |ype;...t|heTrapTy|
|00000b40| 70 65 20 3d 20 47 65 74 | 54 72 61 70 54 79 70 65 |pe = Get|TrapType|
|00000b50| 28 74 68 65 54 72 61 70 | 29 3b 0d 09 69 66 20 28 |(theTrap|);..if (|
|00000b60| 28 74 68 65 54 72 61 70 | 54 79 70 65 20 3d 3d 20 |(theTrap|Type == |
|00000b70| 54 6f 6f 6c 54 72 61 70 | 29 20 26 26 20 28 28 74 |ToolTrap|) && ((t|
|00000b80| 68 65 54 72 61 70 20 26 | 3d 20 30 78 30 37 46 46 |heTrap &|= 0x07FF|
|00000b90| 29 20 3e 3d 20 4e 75 6d | 54 6f 6f 6c 62 6f 78 54 |) >= Num|ToolboxT|
|00000ba0| 72 61 70 73 28 29 29 29 | 0d 09 09 74 68 65 54 72 |raps()))|...theTr|
|00000bb0| 61 70 20 3d 20 5f 55 6e | 69 6d 70 6c 65 6d 65 6e |ap = _Un|implemen|
|00000bc0| 74 65 64 3b 0d 0d 09 72 | 65 74 75 72 6e 28 4e 47 |ted;...r|eturn(NG|
|00000bd0| 65 74 54 72 61 70 41 64 | 64 72 65 73 73 28 5f 55 |etTrapAd|dress(_U|
|00000be0| 6e 69 6d 70 6c 65 6d 65 | 6e 74 65 64 2c 20 54 6f |nimpleme|nted, To|
|00000bf0| 6f 6c 54 72 61 70 29 20 | 21 3d 20 4e 47 65 74 54 |olTrap) |!= NGetT|
|00000c00| 72 61 70 41 64 64 72 65 | 73 73 28 74 68 65 54 72 |rapAddre|ss(theTr|
|00000c10| 61 70 2c 20 74 68 65 54 | 72 61 70 54 79 70 65 29 |ap, theT|rapType)|
|00000c20| 29 3b 0d 7d 0d 0d 76 6f | 69 64 20 47 65 74 53 79 |);.}..vo|id GetSy|
|00000c30| 73 74 65 6d 46 6f 6c 64 | 65 72 28 73 68 6f 72 74 |stemFold|er(short|
|00000c40| 20 2a 76 52 65 66 4e 75 | 6d 50 2c 20 6c 6f 6e 67 | *vRefNu|mP, long|
|00000c50| 20 2a 64 69 72 49 44 50 | 29 0d 7b 0d 09 53 79 73 | *dirIDP|).{..Sys|
|00000c60| 45 6e 76 52 65 63 20 69 | 6e 66 6f 3b 0d 09 6c 6f |EnvRec i|nfo;..lo|
|00000c70| 6e 67 20 77 64 50 72 6f | 63 49 44 3b 0d 09 0d 09 |ng wdPro|cID;....|
|00000c80| 53 79 73 45 6e 76 69 72 | 6f 6e 73 28 31 2c 20 26 |SysEnvir|ons(1, &|
|00000c90| 69 6e 66 6f 29 3b 0d 09 | 69 66 20 28 47 65 74 57 |info);..|if (GetW|
|00000ca0| 44 49 6e 66 6f 28 69 6e | 66 6f 2e 73 79 73 56 52 |DInfo(in|fo.sysVR|
|00000cb0| 65 66 4e 75 6d 2c 20 76 | 52 65 66 4e 75 6d 50 2c |efNum, v|RefNumP,|
|00000cc0| 20 64 69 72 49 44 50 2c | 20 26 77 64 50 72 6f 63 | dirIDP,| &wdProc|
|00000cd0| 49 44 29 20 21 3d 20 6e | 6f 45 72 72 29 20 0d 09 |ID) != n|oErr) ..|
|00000ce0| 7b 0d 09 09 2a 76 52 65 | 66 4e 75 6d 50 20 3d 20 |{...*vRe|fNumP = |
|00000cf0| 30 3b 0d 09 09 2a 64 69 | 72 49 44 50 20 3d 20 30 |0;...*di|rIDP = 0|
|00000d00| 3b 0d 09 7d 0d 7d 0d 0d | 76 6f 69 64 20 47 65 74 |;..}.}..|void Get|
|00000d10| 43 50 61 6e 65 6c 46 6f | 6c 64 65 72 28 73 68 6f |CPanelFo|lder(sho|
|00000d20| 72 74 20 2a 76 52 65 66 | 4e 75 6d 50 2c 20 6c 6f |rt *vRef|NumP, lo|
|00000d30| 6e 67 20 2a 64 69 72 49 | 44 50 29 0d 7b 0d 09 42 |ng *dirI|DP).{..B|
|00000d40| 6f 6f 6c 65 61 6e 20 68 | 61 73 46 6f 6c 64 65 72 |oolean h|asFolder|
|00000d50| 4d 67 72 20 3d 20 66 61 | 6c 73 65 3b 0d 09 6c 6f |Mgr = fa|lse;..lo|
|00000d60| 6e 67 20 66 65 61 74 75 | 72 65 3b 0d 09 0d 09 69 |ng featu|re;....i|
|00000d70| 66 20 28 54 72 61 70 45 | 78 69 73 74 73 28 5f 47 |f (TrapE|xists(_G|
|00000d80| 65 73 74 61 6c 74 44 69 | 73 70 61 74 63 68 29 29 |estaltDi|spatch))|
|00000d90| 20 69 66 20 28 47 65 73 | 74 61 6c 74 28 67 65 73 | if (Ges|talt(ges|
|00000da0| 74 61 6c 74 46 69 6e 64 | 46 6f 6c 64 65 72 41 74 |taltFind|FolderAt|
|00000db0| 74 72 2c 20 26 66 65 61 | 74 75 72 65 29 20 3d 3d |tr, &fea|ture) ==|
|00000dc0| 20 6e 6f 45 72 72 29 20 | 68 61 73 46 6f 6c 64 65 | noErr) |hasFolde|
|00000dd0| 72 4d 67 72 20 3d 20 74 | 72 75 65 3b 0d 09 69 66 |rMgr = t|rue;..if|
|00000de0| 20 28 21 68 61 73 46 6f | 6c 64 65 72 4d 67 72 29 | (!hasFo|lderMgr)|
|00000df0| 20 0d 09 7b 0d 09 09 47 | 65 74 53 79 73 74 65 6d | ..{...G|etSystem|
|00000e00| 46 6f 6c 64 65 72 28 76 | 52 65 66 4e 75 6d 50 2c |Folder(v|RefNumP,|
|00000e10| 20 64 69 72 49 44 50 29 | 3b 0d 09 09 72 65 74 75 | dirIDP)|;...retu|
|00000e20| 72 6e 3b 0d 09 7d 0d 09 | 65 6c 73 65 20 0d 09 7b |rn;..}..|else ..{|
|00000e30| 0d 09 09 69 66 20 28 46 | 69 6e 64 46 6f 6c 64 65 |...if (F|indFolde|
|00000e40| 72 28 6b 4f 6e 53 79 73 | 74 65 6d 44 69 73 6b 2c |r(kOnSys|temDisk,|
|00000e50| 20 6b 43 6f 6e 74 72 6f | 6c 50 61 6e 65 6c 46 6f | kContro|lPanelFo|
|00000e60| 6c 64 65 72 54 79 70 65 | 2c 20 6b 44 6f 6e 74 43 |lderType|, kDontC|
|00000e70| 72 65 61 74 65 46 6f 6c | 64 65 72 2c 20 76 52 65 |reateFol|der, vRe|
|00000e80| 66 4e 75 6d 50 2c 20 64 | 69 72 49 44 50 29 20 21 |fNumP, d|irIDP) !|
|00000e90| 3d 20 6e 6f 45 72 72 29 | 20 0d 09 09 7b 0d 09 09 |= noErr)| ...{...|
|00000ea0| 09 2a 76 52 65 66 4e 75 | 6d 50 20 3d 20 30 3b 0d |.*vRefNu|mP = 0;.|
|00000eb0| 09 09 09 2a 64 69 72 49 | 44 50 20 3d 20 30 3b 0d |...*dirI|DP = 0;.|
|00000ec0| 09 09 7d 0d 09 7d 0d 7d | 0d 09 0d 2f 2a 20 53 65 |..}..}.}|.../* Se|
|00000ed0| 61 72 63 68 46 6f 6c 64 | 65 72 46 6f 72 44 4e 52 |archFold|erForDNR|
|00000ee0| 50 20 69 73 20 63 61 6c | 6c 65 64 20 74 6f 20 73 |P is cal|led to s|
|00000ef0| 65 61 72 63 68 20 61 20 | 66 6f 6c 64 65 72 20 66 |earch a |folder f|
|00000f00| 6f 72 20 66 69 6c 65 73 | 20 74 68 61 74 20 6d 69 |or files| that mi|
|00000f10| 67 68 74 20 0d 09 63 6f | 6e 74 61 69 6e 20 74 68 |ght ..co|ntain th|
|00000f20| 65 20 27 64 6e 72 70 27 | 20 72 65 73 6f 75 72 63 |e 'dnrp'| resourc|
|00000f30| 65 20 2a 2f 0d 73 68 6f | 72 74 20 53 65 61 72 63 |e */.sho|rt Searc|
|00000f40| 68 46 6f 6c 64 65 72 46 | 6f 72 44 4e 52 50 28 6c |hFolderF|orDNRP(l|
|00000f50| 6f 6e 67 20 74 61 72 67 | 65 74 54 79 70 65 2c 20 |ong targ|etType, |
|00000f60| 6c 6f 6e 67 20 74 61 72 | 67 65 74 43 72 65 61 74 |long tar|getCreat|
|00000f70| 6f 72 2c 20 73 68 6f 72 | 74 20 76 52 65 66 4e 75 |or, shor|t vRefNu|
|00000f80| 6d 2c 20 6c 6f 6e 67 20 | 64 69 72 49 44 29 0d 7b |m, long |dirID).{|
|00000f90| 0d 09 48 50 61 72 61 6d | 42 6c 6f 63 6b 52 65 63 |..HParam|BlockRec|
|00000fa0| 20 66 69 3b 0d 09 53 74 | 72 32 35 35 20 66 69 6c | fi;..St|r255 fil|
|00000fb0| 65 6e 61 6d 65 3b 0d 09 | 73 68 6f 72 74 20 72 65 |ename;..|short re|
|00000fc0| 66 6e 75 6d 3b 0d 09 0d | 09 66 69 2e 66 69 6c 65 |fnum;...|.fi.file|
|00000fd0| 50 61 72 61 6d 2e 69 6f | 43 6f 6d 70 6c 65 74 69 |Param.io|Completi|
|00000fe0| 6f 6e 20 3d 20 6e 69 6c | 3b 0d 09 66 69 2e 66 69 |on = nil|;..fi.fi|
|00000ff0| 6c 65 50 61 72 61 6d 2e | 69 6f 4e 61 6d 65 50 74 |leParam.|ioNamePt|
|00001000| 72 20 3d 20 66 69 6c 65 | 6e 61 6d 65 3b 0d 09 66 |r = file|name;..f|
|00001010| 69 2e 66 69 6c 65 50 61 | 72 61 6d 2e 69 6f 56 52 |i.filePa|ram.ioVR|
|00001020| 65 66 4e 75 6d 20 3d 20 | 76 52 65 66 4e 75 6d 3b |efNum = |vRefNum;|
|00001030| 0d 09 66 69 2e 66 69 6c | 65 50 61 72 61 6d 2e 69 |..fi.fil|eParam.i|
|00001040| 6f 44 69 72 49 44 20 3d | 20 64 69 72 49 44 3b 0d |oDirID =| dirID;.|
|00001050| 09 66 69 2e 66 69 6c 65 | 50 61 72 61 6d 2e 69 6f |.fi.file|Param.io|
|00001060| 46 44 69 72 49 6e 64 65 | 78 20 3d 20 31 3b 0d 09 |FDirInde|x = 1;..|
|00001070| 0d 09 77 68 69 6c 65 20 | 28 50 42 48 47 65 74 46 |..while |(PBHGetF|
|00001080| 49 6e 66 6f 28 26 66 69 | 2c 20 66 61 6c 73 65 29 |Info(&fi|, false)|
|00001090| 20 3d 3d 20 6e 6f 45 72 | 72 29 20 0d 09 7b 0d 09 | == noEr|r) ..{..|
|000010a0| 09 2f 2a 20 73 63 61 6e | 20 73 79 73 74 65 6d 20 |./* scan| system |
|000010b0| 66 6f 6c 64 65 72 20 66 | 6f 72 20 64 72 69 76 65 |folder f|or drive|
|000010c0| 72 20 72 65 73 6f 75 72 | 63 65 20 66 69 6c 65 73 |r resour|ce files|
|000010d0| 20 6f 66 20 73 70 65 63 | 69 66 69 63 20 74 79 70 | of spec|ific typ|
|000010e0| 65 20 26 20 63 72 65 61 | 74 6f 72 20 2a 2f 0d 09 |e & crea|tor */..|
|000010f0| 09 69 66 20 28 66 69 2e | 66 69 6c 65 50 61 72 61 |.if (fi.|filePara|
|00001100| 6d 2e 69 6f 46 6c 46 6e | 64 72 49 6e 66 6f 2e 66 |m.ioFlFn|drInfo.f|
|00001110| 64 54 79 70 65 20 3d 3d | 20 74 61 72 67 65 74 54 |dType ==| targetT|
|00001120| 79 70 65 20 26 26 0d 09 | 09 09 66 69 2e 66 69 6c |ype &&..|..fi.fil|
|00001130| 65 50 61 72 61 6d 2e 69 | 6f 46 6c 46 6e 64 72 49 |eParam.i|oFlFndrI|
|00001140| 6e 66 6f 2e 66 64 43 72 | 65 61 74 6f 72 20 3d 3d |nfo.fdCr|eator ==|
|00001150| 20 74 61 72 67 65 74 43 | 72 65 61 74 6f 72 29 20 | targetC|reator) |
|00001160| 0d 09 09 7b 0d 09 09 09 | 2f 2a 20 66 6f 75 6e 64 |...{....|/* found|
|00001170| 20 74 68 65 20 4d 61 63 | 54 43 50 20 64 72 69 76 | the Mac|TCP driv|
|00001180| 65 72 20 66 69 6c 65 3f | 20 2a 2f 0d 09 09 09 72 |er file?| */....r|
|00001190| 65 66 6e 75 6d 20 3d 20 | 48 4f 70 65 6e 52 65 73 |efnum = |HOpenRes|
|000011a0| 46 69 6c 65 28 76 52 65 | 66 4e 75 6d 2c 20 64 69 |File(vRe|fNum, di|
|000011b0| 72 49 44 2c 20 66 69 6c | 65 6e 61 6d 65 2c 20 66 |rID, fil|ename, f|
|000011c0| 73 52 64 50 65 72 6d 29 | 3b 0d 09 09 09 69 66 20 |sRdPerm)|;....if |
|000011d0| 28 47 65 74 49 6e 64 52 | 65 73 6f 75 72 63 65 28 |(GetIndR|esource(|
|000011e0| 27 64 6e 72 70 27 2c 20 | 31 29 20 3d 3d 20 4e 55 |'dnrp', |1) == NU|
|000011f0| 4c 4c 29 0d 09 09 09 09 | 43 6c 6f 73 65 52 65 73 |LL).....|CloseRes|
|00001200| 46 69 6c 65 28 72 65 66 | 6e 75 6d 29 3b 0d 09 09 |File(ref|num);...|
|00001210| 09 65 6c 73 65 0d 09 09 | 09 09 72 65 74 75 72 6e |.else...|..return|
|00001220| 20 72 65 66 6e 75 6d 3b | 0d 09 09 7d 0d 09 09 2f | refnum;|...}.../|
|00001230| 2a 20 63 68 65 63 6b 20 | 6e 65 78 74 20 66 69 6c |* check |next fil|
|00001240| 65 20 69 6e 20 73 79 73 | 74 65 6d 20 66 6f 6c 64 |e in sys|tem fold|
|00001250| 65 72 20 2a 2f 0d 09 09 | 66 69 2e 66 69 6c 65 50 |er */...|fi.fileP|
|00001260| 61 72 61 6d 2e 69 6f 46 | 44 69 72 49 6e 64 65 78 |aram.ioF|DirIndex|
|00001270| 2b 2b 3b 0d 09 09 66 69 | 2e 66 69 6c 65 50 61 72 |++;...fi|.filePar|
|00001280| 61 6d 2e 69 6f 44 69 72 | 49 44 20 3d 20 64 69 72 |am.ioDir|ID = dir|
|00001290| 49 44 3b 09 2f 2a 20 50 | 42 48 47 65 74 46 49 6e |ID;./* P|BHGetFIn|
|000012a0| 66 6f 28 29 20 63 6c 6f | 62 62 65 72 73 20 69 6f |fo() clo|bbers io|
|000012b0| 44 69 72 49 44 20 2a 2f | 0d 09 7d 0d 09 72 65 74 |DirID */|..}..ret|
|000012c0| 75 72 6e 28 2d 31 29 3b | 0d 7d 09 0d 0d 2f 2a 20 |urn(-1);|.}.../* |
|000012d0| 4f 70 65 6e 4f 75 72 52 | 46 20 69 73 20 63 61 6c |OpenOurR|F is cal|
|000012e0| 6c 65 64 20 74 6f 20 6f | 70 65 6e 20 74 68 65 20 |led to o|pen the |
|000012f0| 4d 61 63 54 43 50 20 64 | 72 69 76 65 72 20 72 65 |MacTCP d|river re|
|00001300| 73 6f 75 72 63 65 73 20 | 2a 2f 0d 0d 73 68 6f 72 |sources |*/..shor|
|00001310| 74 20 4f 70 65 6e 4f 75 | 72 52 46 28 76 6f 69 64 |t OpenOu|rRF(void|
|00001320| 29 0d 7b 0d 09 73 68 6f | 72 74 20 72 65 66 6e 75 |).{..sho|rt refnu|
|00001330| 6d 3b 0d 09 73 68 6f 72 | 74 20 76 52 65 66 4e 75 |m;..shor|t vRefNu|
|00001340| 6d 3b 0d 09 6c 6f 6e 67 | 20 64 69 72 49 44 3b 0d |m;..long| dirID;.|
|00001350| 09 0d 09 2f 2a 20 66 69 | 72 73 74 20 73 65 61 72 |.../* fi|rst sear|
|00001360| 63 68 20 43 6f 6e 74 72 | 6f 6c 20 50 61 6e 65 6c |ch Contr|ol Panel|
|00001370| 73 20 66 6f 72 20 4d 61 | 63 54 43 50 20 31 2e 31 |s for Ma|cTCP 1.1|
|00001380| 20 2a 2f 0d 09 47 65 74 | 43 50 61 6e 65 6c 46 6f | */..Get|CPanelFo|
|00001390| 6c 64 65 72 28 26 76 52 | 65 66 4e 75 6d 2c 20 26 |lder(&vR|efNum, &|
|000013a0| 64 69 72 49 44 29 3b 0d | 09 72 65 66 6e 75 6d 20 |dirID);.|.refnum |
|000013b0| 3d 20 53 65 61 72 63 68 | 46 6f 6c 64 65 72 46 6f |= Search|FolderFo|
|000013c0| 72 44 4e 52 50 28 27 63 | 64 65 76 27 2c 20 27 7a |rDNRP('c|dev', 'z|
|000013d0| 74 63 70 27 2c 20 76 52 | 65 66 4e 75 6d 2c 20 64 |tcp', vR|efNum, d|
|000013e0| 69 72 49 44 29 3b 0d 09 | 69 66 20 28 72 65 66 6e |irID);..|if (refn|
|000013f0| 75 6d 20 21 3d 20 2d 31 | 29 20 72 65 74 75 72 6e |um != -1|) return|
|00001400| 28 72 65 66 6e 75 6d 29 | 3b 0d 09 09 0d 09 2f 2a |(refnum)|;...../*|
|00001410| 20 6e 65 78 74 20 73 65 | 61 72 63 68 20 53 79 73 | next se|arch Sys|
|00001420| 74 65 6d 20 46 6f 6c 64 | 65 72 20 66 6f 72 20 4d |tem Fold|er for M|
|00001430| 61 63 54 43 50 20 31 2e | 30 2e 78 20 2a 2f 0d 09 |acTCP 1.|0.x */..|
|00001440| 47 65 74 53 79 73 74 65 | 6d 46 6f 6c 64 65 72 28 |GetSyste|mFolder(|
|00001450| 26 76 52 65 66 4e 75 6d | 2c 20 26 64 69 72 49 44 |&vRefNum|, &dirID|
|00001460| 29 3b 0d 09 72 65 66 6e | 75 6d 20 3d 20 53 65 61 |);..refn|um = Sea|
|00001470| 72 63 68 46 6f 6c 64 65 | 72 46 6f 72 44 4e 52 50 |rchFolde|rForDNRP|
|00001480| 28 27 63 64 65 76 27 2c | 20 27 6d 74 63 70 27 2c |('cdev',| 'mtcp',|
|00001490| 20 76 52 65 66 4e 75 6d | 2c 20 64 69 72 49 44 29 | vRefNum|, dirID)|
|000014a0| 3b 0d 09 69 66 20 28 72 | 65 66 6e 75 6d 20 21 3d |;..if (r|efnum !=|
|000014b0| 20 2d 31 29 20 72 65 74 | 75 72 6e 28 72 65 66 6e | -1) ret|urn(refn|
|000014c0| 75 6d 29 3b 0d 09 09 0d | 09 2f 2a 20 66 69 6e 61 |um);....|./* fina|
|000014d0| 6c 6c 79 2c 20 73 65 61 | 72 63 68 20 43 6f 6e 74 |lly, sea|rch Cont|
|000014e0| 72 6f 6c 20 50 61 6e 65 | 6c 73 20 66 6f 72 20 4d |rol Pane|ls for M|
|000014f0| 61 63 54 43 50 20 31 2e | 30 2e 78 20 2a 2f 0d 09 |acTCP 1.|0.x */..|
|00001500| 47 65 74 43 50 61 6e 65 | 6c 46 6f 6c 64 65 72 28 |GetCPane|lFolder(|
|00001510| 26 76 52 65 66 4e 75 6d | 2c 20 26 64 69 72 49 44 |&vRefNum|, &dirID|
|00001520| 29 3b 0d 09 72 65 66 6e | 75 6d 20 3d 20 53 65 61 |);..refn|um = Sea|
|00001530| 72 63 68 46 6f 6c 64 65 | 72 46 6f 72 44 4e 52 50 |rchFolde|rForDNRP|
|00001540| 28 27 63 64 65 76 27 2c | 20 27 6d 74 63 70 27 2c |('cdev',| 'mtcp',|
|00001550| 20 76 52 65 66 4e 75 6d | 2c 20 64 69 72 49 44 29 | vRefNum|, dirID)|
|00001560| 3b 0d 09 69 66 20 28 72 | 65 66 6e 75 6d 20 21 3d |;..if (r|efnum !=|
|00001570| 20 2d 31 29 20 72 65 74 | 75 72 6e 28 72 65 66 6e | -1) ret|urn(refn|
|00001580| 75 6d 29 3b 0d 09 09 0d | 09 72 65 74 75 72 6e 20 |um);....|.return |
|00001590| 2d 31 3b 0d 7d 09 0d 0d | 0d 4f 53 45 72 72 20 4f |-1;.}...|.OSErr O|
|000015a0| 70 65 6e 52 65 73 6f 6c | 76 65 72 28 63 68 61 72 |penResol|ver(char|
|000015b0| 20 2a 66 69 6c 65 4e 61 | 6d 65 29 0d 7b 0d 09 73 | *fileNa|me).{..s|
|000015c0| 68 6f 72 74 20 09 09 09 | 72 65 66 6e 75 6d 3b 0d |hort ...|refnum;.|
|000015d0| 09 4f 53 45 72 72 20 09 | 09 09 72 63 3b 0d 09 0d |.OSErr .|..rc;...|
|000015e0| 09 69 66 20 28 67 44 4e | 52 43 6f 64 65 50 74 72 |.if (gDN|RCodePtr|
|000015f0| 20 21 3d 20 6e 69 6c 29 | 0d 09 09 2f 2a 20 72 65 | != nil)|.../* re|
|00001600| 73 6f 6c 76 65 72 20 61 | 6c 72 65 61 64 79 20 6c |solver a|lready l|
|00001610| 6f 61 64 65 64 20 69 6e | 20 2a 2f 0d 09 09 72 65 |oaded in| */...re|
|00001620| 74 75 72 6e 28 6e 6f 45 | 72 72 29 3b 0d 09 09 0d |turn(noE|rr);....|
|00001630| 09 2f 2a 20 6f 70 65 6e | 20 74 68 65 20 4d 61 63 |./* open| the Mac|
|00001640| 54 43 50 20 64 72 69 76 | 65 72 20 74 6f 20 67 65 |TCP driv|er to ge|
|00001650| 74 20 44 4e 52 20 72 65 | 73 6f 75 72 63 65 73 2e |t DNR re|sources.|
|00001660| 20 53 65 61 72 63 68 20 | 66 6f 72 20 69 74 20 62 | Search |for it b|
|00001670| 61 73 65 64 20 6f 6e 0d | 09 20 20 20 63 72 65 61 |ased on.|. crea|
|00001680| 74 6f 72 20 26 20 74 79 | 70 65 20 72 61 74 68 65 |tor & ty|pe rathe|
|00001690| 72 20 74 68 61 6e 20 73 | 69 6d 70 6c 79 20 66 69 |r than s|imply fi|
|000016a0| 6c 65 20 6e 61 6d 65 20 | 2a 2f 09 0d 09 72 65 66 |le name |*/...ref|
|000016b0| 6e 75 6d 20 3d 20 4f 70 | 65 6e 4f 75 72 52 46 28 |num = Op|enOurRF(|
|000016c0| 29 3b 0d 0d 09 2f 2a 20 | 69 67 6e 6f 72 65 20 66 |);.../* |ignore f|
|000016d0| 61 69 6c 75 72 65 73 20 | 73 69 6e 63 65 20 74 68 |ailures |since th|
|000016e0| 65 20 72 65 73 6f 75 72 | 63 65 20 6d 61 79 20 68 |e resour|ce may h|
|000016f0| 61 76 65 20 62 65 65 6e | 20 69 6e 73 74 61 6c 6c |ave been| install|
|00001700| 65 64 20 69 6e 20 74 68 | 65 20 0d 09 20 20 20 53 |ed in th|e .. S|
|00001710| 79 73 74 65 6d 20 66 69 | 6c 65 20 69 66 20 72 75 |ystem fi|le if ru|
|00001720| 6e 6e 69 6e 67 20 6f 6e | 20 61 20 4d 61 63 20 35 |nning on| a Mac 5|
|00001730| 31 32 4b 65 20 2a 2f 0d | 09 20 20 20 0d 09 2f 2a |12Ke */.|. ../*|
|00001740| 20 6c 6f 61 64 20 69 6e | 20 74 68 65 20 44 4e 52 | load in| the DNR|
|00001750| 20 72 65 73 6f 75 72 63 | 65 20 70 61 63 6b 61 67 | resourc|e packag|
|00001760| 65 20 2a 2f 0d 09 67 44 | 4e 52 43 6f 64 65 48 6e |e */..gD|NRCodeHn|
|00001770| 64 6c 20 3d 20 47 65 74 | 49 6e 64 52 65 73 6f 75 |dl = Get|IndResou|
|00001780| 72 63 65 28 27 64 6e 72 | 70 27 2c 20 31 29 3b 0d |rce('dnr|p', 1);.|
|00001790| 09 69 66 20 28 67 44 4e | 52 43 6f 64 65 48 6e 64 |.if (gDN|RCodeHnd|
|000017a0| 6c 20 3d 3d 20 6e 69 6c | 29 0d 09 7b 0d 09 09 2f |l == nil|)..{.../|
|000017b0| 2a 20 63 61 6e 27 74 20 | 6f 70 65 6e 20 44 4e 52 |* can't |open DNR|
|000017c0| 20 2a 2f 0d 09 09 72 65 | 74 75 72 6e 28 52 65 73 | */...re|turn(Res|
|000017d0| 45 72 72 6f 72 28 29 29 | 3b 0d 09 7d 0d 09 0d 09 |Error())|;..}....|
|000017e0| 44 65 74 61 63 68 52 65 | 73 6f 75 72 63 65 28 67 |DetachRe|source(g|
|000017f0| 44 4e 52 43 6f 64 65 48 | 6e 64 6c 29 3b 0d 09 69 |DNRCodeH|ndl);..i|
|00001800| 66 20 28 72 65 66 6e 75 | 6d 20 21 3d 20 2d 31 29 |f (refnu|m != -1)|
|00001810| 20 0d 09 7b 0d 09 09 43 | 6c 6f 73 65 52 65 73 46 | ..{...C|loseResF|
|00001820| 69 6c 65 28 72 65 66 6e | 75 6d 29 3b 0d 09 7d 0d |ile(refn|um);..}.|
|00001830| 09 09 0d 09 2f 2a 20 6c | 6f 63 6b 20 74 68 65 20 |..../* l|ock the |
|00001840| 44 4e 52 20 72 65 73 6f | 75 72 63 65 20 73 69 6e |DNR reso|urce sin|
|00001850| 63 65 20 69 74 20 63 61 | 6e 6e 6f 74 20 62 65 20 |ce it ca|nnot be |
|00001860| 72 65 6c 6f 61 74 65 64 | 20 77 68 69 6c 65 20 6f |reloated| while o|
|00001870| 70 65 6e 65 64 20 2a 2f | 0d 09 4d 6f 76 65 48 48 |pened */|..MoveHH|
|00001880| 69 28 67 44 4e 52 43 6f | 64 65 48 6e 64 6c 29 3b |i(gDNRCo|deHndl);|
|00001890| 0d 09 48 4c 6f 63 6b 28 | 67 44 4e 52 43 6f 64 65 |..HLock(|gDNRCode|
|000018a0| 48 6e 64 6c 29 3b 0d 09 | 0d 09 67 44 4e 52 43 6f |Hndl);..|..gDNRCo|
|000018b0| 64 65 50 74 72 20 3d 20 | 28 50 72 6f 63 50 74 72 |dePtr = |(ProcPtr|
|000018c0| 29 2a 67 44 4e 52 43 6f | 64 65 48 6e 64 6c 3b 0d |)*gDNRCo|deHndl;.|
|000018d0| 09 0d 09 2f 2a 20 63 61 | 6c 6c 20 6f 70 65 6e 20 |.../* ca|ll open |
|000018e0| 72 65 73 6f 6c 76 65 72 | 20 2a 2f 0d 09 2f 2f 20 |resolver| */..// |
|000018f0| 52 52 4b 20 6d 6f 64 69 | 66 69 63 61 74 69 6f 6e |RRK modi|fication|
|00001900| 20 31 2f 39 35 20 75 73 | 65 20 43 61 6c 6c 4f 70 | 1/95 us|e CallOp|
|00001910| 65 6e 52 65 73 6f 6c 76 | 65 72 50 72 6f 63 20 64 |enResolv|erProc d|
|00001920| 65 66 69 6e 65 20 74 6f | 20 63 61 6c 6c 20 55 50 |efine to| call UP|
|00001930| 50 0d 09 0d 09 72 63 20 | 3d 20 43 61 6c 6c 4f 70 |P....rc |= CallOp|
|00001940| 65 6e 52 65 73 6f 6c 76 | 65 72 50 72 6f 63 28 67 |enResolv|erProc(g|
|00001950| 44 4e 52 43 6f 64 65 50 | 74 72 2c 20 4f 50 45 4e |DNRCodeP|tr, OPEN|
|00001960| 52 45 53 4f 4c 56 45 52 | 2c 20 66 69 6c 65 4e 61 |RESOLVER|, fileNa|
|00001970| 6d 65 29 3b 0d 09 69 66 | 20 28 72 63 20 21 3d 20 |me);..if| (rc != |
|00001980| 6e 6f 45 72 72 29 20 0d | 09 7b 0d 09 09 2f 2a 20 |noErr) .|.{.../* |
|00001990| 70 72 6f 62 6c 65 6d 20 | 77 69 74 68 20 6f 70 65 |problem |with ope|
|000019a0| 6e 20 72 65 73 6f 6c 76 | 65 72 2c 20 66 6c 75 73 |n resolv|er, flus|
|000019b0| 68 20 69 74 20 2a 2f 0d | 09 09 48 55 6e 6c 6f 63 |h it */.|..HUnloc|
|000019c0| 6b 28 67 44 4e 52 43 6f | 64 65 48 6e 64 6c 29 3b |k(gDNRCo|deHndl);|
|000019d0| 0d 09 09 44 69 73 70 6f | 73 65 48 61 6e 64 6c 65 |...Dispo|seHandle|
|000019e0| 28 67 44 4e 52 43 6f 64 | 65 48 6e 64 6c 29 3b 0d |(gDNRCod|eHndl);.|
|000019f0| 09 09 67 44 4e 52 43 6f | 64 65 50 74 72 20 3d 20 |..gDNRCo|dePtr = |
|00001a00| 6e 69 6c 3b 0d 09 7d 0d | 09 72 65 74 75 72 6e 28 |nil;..}.|.return(|
|00001a10| 72 63 29 3b 0d 7d 0d 0d | 0d 4f 53 45 72 72 20 43 |rc);.}..|.OSErr C|
|00001a20| 6c 6f 73 65 52 65 73 6f | 6c 76 65 72 28 76 6f 69 |loseReso|lver(voi|
|00001a30| 64 29 0d 7b 0d 09 0d 09 | 69 66 20 28 67 44 4e 52 |d).{....|if (gDNR|
|00001a40| 43 6f 64 65 50 74 72 20 | 3d 3d 20 6e 69 6c 29 0d |CodePtr |== nil).|
|00001a50| 09 09 2f 2a 20 72 65 73 | 6f 6c 76 65 72 20 6e 6f |../* res|olver no|
|00001a60| 74 20 6c 6f 61 64 65 64 | 20 65 72 72 6f 72 20 2a |t loaded| error *|
|00001a70| 2f 0d 09 09 72 65 74 75 | 72 6e 28 6e 6f 74 4f 70 |/...retu|rn(notOp|
|00001a80| 65 6e 45 72 72 29 3b 0d | 09 09 0d 09 2f 2a 20 63 |enErr);.|..../* c|
|00001a90| 61 6c 6c 20 63 6c 6f 73 | 65 20 72 65 73 6f 6c 76 |all clos|e resolv|
|00001aa0| 65 72 20 2a 2f 0d 09 2f | 2f 20 52 52 4b 20 6d 6f |er */../|/ RRK mo|
|00001ab0| 64 69 66 69 63 61 74 69 | 6f 6e 20 31 2f 39 35 20 |dificati|on 1/95 |
|00001ac0| 75 73 65 20 43 61 6c 6c | 43 6c 6f 73 65 52 65 73 |use Call|CloseRes|
|00001ad0| 6f 6c 76 65 72 50 72 6f | 63 20 64 65 66 69 6e 65 |olverPro|c define|
|00001ae0| 20 74 6f 20 63 61 6c 6c | 20 55 50 50 0d 09 2f 2f | to call| UPP..//|
|00001af0| 20 28 76 6f 69 64 29 20 | 28 2a 64 6e 72 29 28 43 | (void) |(*dnr)(C|
|00001b00| 4c 4f 53 45 52 45 53 4f | 4c 56 45 52 29 3b 0d 0d |LOSERESO|LVER);..|
|00001b10| 09 43 61 6c 6c 43 6c 6f | 73 65 52 65 73 6f 6c 76 |.CallClo|seResolv|
|00001b20| 65 72 50 72 6f 63 28 67 | 44 4e 52 43 6f 64 65 50 |erProc(g|DNRCodeP|
|00001b30| 74 72 2c 20 43 4c 4f 53 | 45 52 45 53 4f 4c 56 45 |tr, CLOS|ERESOLVE|
|00001b40| 52 29 3b 0d 09 0d 09 2f | 2a 20 72 65 6c 65 61 73 |R);..../|* releas|
|00001b50| 65 20 74 68 65 20 44 4e | 52 20 72 65 73 6f 75 72 |e the DN|R resour|
|00001b60| 63 65 20 70 61 63 6b 61 | 67 65 20 2a 2f 0d 09 48 |ce packa|ge */..H|
|00001b70| 55 6e 6c 6f 63 6b 28 67 | 44 4e 52 43 6f 64 65 48 |Unlock(g|DNRCodeH|
|00001b80| 6e 64 6c 29 3b 0d 09 44 | 69 73 70 6f 73 65 48 61 |ndl);..D|isposeHa|
|00001b90| 6e 64 6c 65 28 67 44 4e | 52 43 6f 64 65 48 6e 64 |ndle(gDN|RCodeHnd|
|00001ba0| 6c 29 3b 0d 09 67 44 4e | 52 43 6f 64 65 50 74 72 |l);..gDN|RCodePtr|
|00001bb0| 20 3d 20 6e 69 6c 3b 0d | 09 72 65 74 75 72 6e 28 | = nil;.|.return(|
|00001bc0| 6e 6f 45 72 72 29 3b 0d | 7d 0d 0d 09 2f 2f 20 52 |noErr);.|}...// R|
|00001bd0| 52 4b 20 6d 6f 64 69 66 | 69 63 61 74 69 6f 6e 20 |RK modif|ication |
|00001be0| 31 2f 39 35 20 64 65 63 | 6c 61 72 65 20 70 61 72 |1/95 dec|lare par|
|00001bf0| 61 6d 65 74 65 72 20 72 | 65 73 75 6c 74 50 72 6f |ameter r|esultPro|
|00001c00| 63 20 74 6f 20 62 65 20 | 6f 66 20 74 79 70 65 20 |c to be |of type |
|00001c10| 0d 09 2f 2f 20 52 65 73 | 75 6c 74 50 72 6f 63 55 |..// Res|ultProcU|
|00001c20| 50 50 20 69 6e 73 74 65 | 61 64 20 6f 66 20 61 20 |PP inste|ad of a |
|00001c30| 6c 6f 6e 67 0d 09 0d 4f | 53 45 72 72 20 53 74 72 |long...O|SErr Str|
|00001c40| 54 6f 41 64 64 72 28 63 | 68 61 72 20 2a 68 6f 73 |ToAddr(c|har *hos|
|00001c50| 74 4e 61 6d 65 2c 20 73 | 74 72 75 63 74 20 68 6f |tName, s|truct ho|
|00001c60| 73 74 49 6e 66 6f 20 2a | 72 74 6e 53 74 72 75 63 |stInfo *|rtnStruc|
|00001c70| 74 2c 20 0d 09 09 09 52 | 65 73 75 6c 74 55 50 50 |t, ....R|esultUPP|
|00001c80| 20 72 65 73 75 6c 74 70 | 72 6f 63 2c 20 50 74 72 | resultp|roc, Ptr|
|00001c90| 20 75 73 65 72 44 61 74 | 61 50 74 72 29 0d 7b 0d | userDat|aPtr).{.|
|00001ca0| 09 69 66 20 28 67 44 4e | 52 43 6f 64 65 50 74 72 |.if (gDN|RCodePtr|
|00001cb0| 20 3d 3d 20 6e 69 6c 29 | 0d 09 09 2f 2a 20 72 65 | == nil)|.../* re|
|00001cc0| 73 6f 6c 76 65 72 20 6e | 6f 74 20 6c 6f 61 64 65 |solver n|ot loade|
|00001cd0| 64 20 65 72 72 6f 72 20 | 2a 2f 0d 09 09 72 65 74 |d error |*/...ret|
|00001ce0| 75 72 6e 28 6e 6f 74 4f | 70 65 6e 45 72 72 29 3b |urn(notO|penErr);|
|00001cf0| 0d 09 09 0d 09 2f 2f 20 | 52 52 4b 20 6d 6f 64 69 |.....// |RRK modi|
|00001d00| 66 69 63 61 74 69 6f 6e | 20 31 2f 39 35 20 75 73 |fication| 1/95 us|
|00001d10| 65 20 43 61 6c 6c 53 74 | 72 54 6f 41 64 64 72 50 |e CallSt|rToAddrP|
|00001d20| 72 6f 63 20 64 65 66 69 | 6e 65 20 74 6f 20 63 61 |roc defi|ne to ca|
|00001d30| 6c 6c 20 55 50 50 0d 09 | 2f 2f 20 72 65 74 75 72 |ll UPP..|// retur|
|00001d40| 6e 28 28 2a 64 6e 72 29 | 28 53 54 52 54 4f 41 44 |n((*dnr)|(STRTOAD|
|00001d50| 44 52 2c 20 68 6f 73 74 | 4e 61 6d 65 2c 20 72 74 |DR, host|Name, rt|
|00001d60| 6e 53 74 72 75 63 74 2c | 20 72 65 73 75 6c 74 70 |nStruct,| resultp|
|00001d70| 72 6f 63 2c 20 75 73 65 | 72 44 61 74 61 50 74 72 |roc, use|rDataPtr|
|00001d80| 29 29 3b 0d 09 09 09 0d | 09 72 65 74 75 72 6e 20 |));.....|.return |
|00001d90| 28 43 61 6c 6c 53 74 72 | 54 6f 41 64 64 72 50 72 |(CallStr|ToAddrPr|
|00001da0| 6f 63 28 67 44 4e 52 43 | 6f 64 65 50 74 72 2c 20 |oc(gDNRC|odePtr, |
|00001db0| 53 54 52 54 4f 41 44 44 | 52 2c 20 68 6f 73 74 4e |STRTOADD|R, hostN|
|00001dc0| 61 6d 65 2c 20 72 74 6e | 53 74 72 75 63 74 2c 20 |ame, rtn|Struct, |
|00001dd0| 72 65 73 75 6c 74 70 72 | 6f 63 2c 20 75 73 65 72 |resultpr|oc, user|
|00001de0| 44 61 74 61 50 74 72 29 | 29 3b 0d 7d 0d 09 0d 4f |DataPtr)|);.}...O|
|00001df0| 53 45 72 72 20 41 64 64 | 72 54 6f 53 74 72 28 75 |SErr Add|rToStr(u|
|00001e00| 6e 73 69 67 6e 65 64 20 | 6c 6f 6e 67 20 61 64 64 |nsigned |long add|
|00001e10| 72 2c 20 63 68 61 72 20 | 2a 61 64 64 72 53 74 72 |r, char |*addrStr|
|00001e20| 29 0d 7b 0d 09 4f 53 45 | 72 72 09 65 72 72 3b 0d |).{..OSE|rr.err;.|
|00001e30| 09 69 66 20 28 67 44 4e | 52 43 6f 64 65 50 74 72 |.if (gDN|RCodePtr|
|00001e40| 20 3d 3d 20 6e 69 6c 29 | 0d 09 09 2f 2a 20 72 65 | == nil)|.../* re|
|00001e50| 73 6f 6c 76 65 72 20 6e | 6f 74 20 6c 6f 61 64 65 |solver n|ot loade|
|00001e60| 64 20 65 72 72 6f 72 20 | 2a 2f 0d 09 09 72 65 74 |d error |*/...ret|
|00001e70| 75 72 6e 28 6e 6f 74 4f | 70 65 6e 45 72 72 29 3b |urn(notO|penErr);|
|00001e80| 0d 09 09 0d 09 2f 2f 20 | 52 52 4b 20 6d 6f 64 69 |.....// |RRK modi|
|00001e90| 66 69 63 61 74 69 6f 6e | 20 31 2f 39 35 20 75 73 |fication| 1/95 us|
|00001ea0| 65 20 43 61 6c 6c 41 64 | 64 72 54 6f 53 74 72 50 |e CallAd|drToStrP|
|00001eb0| 72 6f 63 20 64 65 66 69 | 6e 65 20 74 6f 20 63 61 |roc defi|ne to ca|
|00001ec0| 6c 6c 20 55 50 50 0d 09 | 2f 2f 20 28 2a 64 6e 72 |ll UPP..|// (*dnr|
|00001ed0| 29 28 41 44 44 52 54 4f | 53 54 52 2c 20 61 64 64 |)(ADDRTO|STR, add|
|00001ee0| 72 2c 20 61 64 64 72 53 | 74 72 29 3b 0d 09 0d 09 |r, addrS|tr);....|
|00001ef0| 65 72 72 20 3d 20 43 61 | 6c 6c 41 64 64 72 54 6f |err = Ca|llAddrTo|
|00001f00| 53 74 72 50 72 6f 63 28 | 67 44 4e 52 43 6f 64 65 |StrProc(|gDNRCode|
|00001f10| 50 74 72 2c 20 41 44 44 | 52 54 4f 53 54 52 2c 20 |Ptr, ADD|RTOSTR, |
|00001f20| 61 64 64 72 2c 20 61 64 | 64 72 53 74 72 29 3b 0d |addr, ad|drStr);.|
|00001f30| 09 72 65 74 75 72 6e 28 | 6e 6f 45 72 72 29 3b 0d |.return(|noErr);.|
|00001f40| 7d 0d 09 0d 4f 53 45 72 | 72 20 45 6e 75 6d 43 61 |}...OSEr|r EnumCa|
|00001f50| 63 68 65 28 45 6e 75 6d | 52 65 73 75 6c 74 55 50 |che(Enum|ResultUP|
|00001f60| 50 20 72 65 73 75 6c 74 | 70 72 6f 63 2c 20 50 74 |P result|proc, Pt|
|00001f70| 72 20 75 73 65 72 44 61 | 74 61 50 74 72 29 0d 7b |r userDa|taPtr).{|
|00001f80| 0d 0d 09 69 66 20 28 67 | 44 4e 52 43 6f 64 65 50 |...if (g|DNRCodeP|
|00001f90| 74 72 20 3d 3d 20 6e 69 | 6c 29 0d 09 09 2f 2a 20 |tr == ni|l).../* |
|00001fa0| 72 65 73 6f 6c 76 65 72 | 20 6e 6f 74 20 6c 6f 61 |resolver| not loa|
|00001fb0| 64 65 64 20 65 72 72 6f | 72 20 2a 2f 0d 09 09 72 |ded erro|r */...r|
|00001fc0| 65 74 75 72 6e 28 6e 6f | 74 4f 70 65 6e 45 72 72 |eturn(no|tOpenErr|
|00001fd0| 29 3b 0d 09 09 0d 09 2f | 2f 20 52 52 4b 20 6d 6f |);...../|/ RRK mo|
|00001fe0| 64 69 66 69 63 61 74 69 | 6f 6e 20 31 2f 39 35 20 |dificati|on 1/95 |
|00001ff0| 75 73 65 20 43 61 6c 6c | 45 6e 75 6d 43 61 63 68 |use Call|EnumCach|
|00002000| 65 50 72 6f 63 20 64 65 | 66 69 6e 65 20 74 6f 20 |eProc de|fine to |
|00002010| 63 61 6c 6c 20 55 50 50 | 0d 09 2f 2f 20 72 65 74 |call UPP|..// ret|
|00002020| 75 72 6e 28 28 2a 64 6e | 72 29 28 45 4e 55 4d 43 |urn((*dn|r)(ENUMC|
|00002030| 41 43 48 45 2c 20 72 65 | 73 75 6c 74 70 72 6f 63 |ACHE, re|sultproc|
|00002040| 2c 20 75 73 65 72 44 61 | 74 61 50 74 72 29 29 3b |, userDa|taPtr));|
|00002050| 0d 0d 09 72 65 74 75 72 | 6e 20 28 43 61 6c 6c 45 |...retur|n (CallE|
|00002060| 6e 75 6d 43 61 63 68 65 | 50 72 6f 63 28 67 44 4e |numCache|Proc(gDN|
|00002070| 52 43 6f 64 65 50 74 72 | 2c 20 45 4e 55 4d 43 41 |RCodePtr|, ENUMCA|
|00002080| 43 48 45 2c 20 72 65 73 | 75 6c 74 70 72 6f 63 2c |CHE, res|ultproc,|
|00002090| 20 75 73 65 72 44 61 74 | 61 50 74 72 29 29 3b 0d | userDat|aPtr));.|
|000020a0| 7d 0d 09 0d 09 0d 4f 53 | 45 72 72 20 41 64 64 72 |}.....OS|Err Addr|
|000020b0| 54 6f 4e 61 6d 65 28 75 | 6e 73 69 67 6e 65 64 20 |ToName(u|nsigned |
|000020c0| 6c 6f 6e 67 20 61 64 64 | 72 2c 20 73 74 72 75 63 |long add|r, struc|
|000020d0| 74 20 68 6f 73 74 49 6e | 66 6f 20 2a 72 74 6e 53 |t hostIn|fo *rtnS|
|000020e0| 74 72 75 63 74 2c 20 0d | 09 09 09 52 65 73 75 6c |truct, .|...Resul|
|000020f0| 74 55 50 50 20 72 65 73 | 75 6c 74 70 72 6f 63 2c |tUPP res|ultproc,|
|00002100| 20 50 74 72 20 75 73 65 | 72 44 61 74 61 50 74 72 | Ptr use|rDataPtr|
|00002110| 29 0d 7b 0d 09 69 66 20 | 28 67 44 4e 52 43 6f 64 |).{..if |(gDNRCod|
|00002120| 65 50 74 72 20 3d 3d 20 | 6e 69 6c 29 0d 09 09 2f |ePtr == |nil).../|
|00002130| 2a 20 72 65 73 6f 6c 76 | 65 72 20 6e 6f 74 20 6c |* resolv|er not l|
|00002140| 6f 61 64 65 64 20 65 72 | 72 6f 72 20 2a 2f 0d 09 |oaded er|ror */..|
|00002150| 09 72 65 74 75 72 6e 28 | 6e 6f 74 4f 70 65 6e 45 |.return(|notOpenE|
|00002160| 72 72 29 3b 0d 09 09 0d | 09 2f 2f 20 52 52 4b 20 |rr);....|.// RRK |
|00002170| 6d 6f 64 69 66 69 63 61 | 74 69 6f 6e 20 31 2f 39 |modifica|tion 1/9|
|00002180| 35 20 75 73 65 20 43 61 | 6c 6c 41 64 64 72 54 6f |5 use Ca|llAddrTo|
|00002190| 4e 61 6d 65 50 72 6f 63 | 20 64 65 66 69 6e 65 20 |NameProc| define |
|000021a0| 74 6f 20 63 61 6c 6c 20 | 55 50 50 0d 09 2f 2f 20 |to call |UPP..// |
|000021b0| 72 65 74 75 72 6e 28 28 | 2a 64 6e 72 29 28 41 44 |return((|*dnr)(AD|
|000021c0| 44 52 54 4f 4e 41 4d 45 | 2c 20 61 64 64 72 2c 20 |DRTONAME|, addr, |
|000021d0| 72 74 6e 53 74 72 75 63 | 74 2c 20 72 65 73 75 6c |rtnStruc|t, resul|
|000021e0| 74 70 72 6f 63 2c 20 75 | 73 65 72 44 61 74 61 50 |tproc, u|serDataP|
|000021f0| 74 72 29 29 3b 0d 0d 09 | 72 65 74 75 72 6e 28 43 |tr));...|return(C|
|00002200| 61 6c 6c 41 64 64 72 54 | 6f 4e 61 6d 65 50 72 6f |allAddrT|oNamePro|
|00002210| 63 28 67 44 4e 52 43 6f | 64 65 50 74 72 2c 20 41 |c(gDNRCo|dePtr, A|
|00002220| 44 44 52 54 4f 4e 41 4d | 45 2c 20 61 64 64 72 2c |DDRTONAM|E, addr,|
|00002230| 20 72 74 6e 53 74 72 75 | 63 74 2c 20 72 65 73 75 | rtnStru|ct, resu|
|00002240| 6c 74 70 72 6f 63 2c 20 | 75 73 65 72 44 61 74 61 |ltproc, |userData|
|00002250| 50 74 72 29 29 3b 0d 7d | 0d 0d 0d 65 78 74 65 72 |Ptr));.}|...exter|
|00002260| 6e 20 4f 53 45 72 72 20 | 48 49 6e 66 6f 28 63 68 |n OSErr |HInfo(ch|
|00002270| 61 72 20 2a 68 6f 73 74 | 4e 61 6d 65 2c 20 73 74 |ar *host|Name, st|
|00002280| 72 75 63 74 20 72 65 74 | 75 72 6e 52 65 63 20 2a |ruct ret|urnRec *|
|00002290| 72 65 74 75 72 6e 52 65 | 63 50 74 72 2c 20 0d 09 |returnRe|cPtr, ..|
|000022a0| 09 09 52 65 73 75 6c 74 | 50 72 6f 63 32 55 50 50 |..Result|Proc2UPP|
|000022b0| 20 72 65 73 75 6c 74 50 | 72 6f 63 2c 20 50 74 72 | resultP|roc, Ptr|
|000022c0| 20 75 73 65 72 44 61 74 | 61 50 74 72 29 0d 7b 0d | userDat|aPtr).{.|
|000022d0| 09 69 66 20 28 67 44 4e | 52 43 6f 64 65 50 74 72 |.if (gDN|RCodePtr|
|000022e0| 20 3d 3d 20 6e 69 6c 29 | 0d 09 09 2f 2a 20 72 65 | == nil)|.../* re|
|000022f0| 73 6f 6c 76 65 72 20 6e | 6f 74 20 6c 6f 61 64 65 |solver n|ot loade|
|00002300| 64 20 65 72 72 6f 72 20 | 2a 2f 0d 09 09 72 65 74 |d error |*/...ret|
|00002310| 75 72 6e 28 6e 6f 74 4f | 70 65 6e 45 72 72 29 3b |urn(notO|penErr);|
|00002320| 0d 09 09 0d 09 2f 2f 20 | 52 52 4b 20 6d 6f 64 69 |.....// |RRK modi|
|00002330| 66 69 63 61 74 69 6f 6e | 20 31 2f 39 35 20 75 73 |fication| 1/95 us|
|00002340| 65 20 43 61 6c 6c 48 49 | 6e 66 6f 50 72 6f 63 20 |e CallHI|nfoProc |
|00002350| 64 65 66 69 6e 65 20 74 | 6f 20 63 61 6c 6c 20 55 |define t|o call U|
|00002360| 50 50 0d 09 2f 2f 20 72 | 65 74 75 72 6e 28 28 2a |PP..// r|eturn((*|
|00002370| 64 6e 72 29 28 48 49 4e | 46 4f 2c 20 68 6f 73 74 |dnr)(HIN|FO, host|
|00002380| 4e 61 6d 65 2c 20 72 65 | 74 75 72 6e 52 65 63 50 |Name, re|turnRecP|
|00002390| 74 72 2c 20 72 65 73 75 | 6c 74 50 72 6f 63 2c 20 |tr, resu|ltProc, |
|000023a0| 75 73 65 72 44 61 74 61 | 50 74 72 29 29 3b 0d 0d |userData|Ptr));..|
|000023b0| 09 72 65 74 75 72 6e 28 | 43 61 6c 6c 48 49 6e 66 |.return(|CallHInf|
|000023c0| 6f 50 72 6f 63 28 67 44 | 4e 52 43 6f 64 65 50 74 |oProc(gD|NRCodePt|
|000023d0| 72 2c 20 48 58 49 4e 46 | 4f 2c 20 68 6f 73 74 4e |r, HXINF|O, hostN|
|000023e0| 61 6d 65 2c 20 72 65 74 | 75 72 6e 52 65 63 50 74 |ame, ret|urnRecPt|
|000023f0| 72 2c 20 72 65 73 75 6c | 74 50 72 6f 63 2c 20 75 |r, resul|tProc, u|
|00002400| 73 65 72 44 61 74 61 50 | 74 72 29 29 3b 0d 0d 7d |serDataP|tr));..}|
|00002410| 0d 09 0d 65 78 74 65 72 | 6e 20 4f 53 45 72 72 20 |...exter|n OSErr |
|00002420| 4d 58 49 6e 66 6f 28 63 | 68 61 72 20 2a 68 6f 73 |MXInfo(c|har *hos|
|00002430| 74 4e 61 6d 65 2c 20 73 | 74 72 75 63 74 20 72 65 |tName, s|truct re|
|00002440| 74 75 72 6e 52 65 63 20 | 2a 72 65 74 75 72 6e 52 |turnRec |*returnR|
|00002450| 65 63 50 74 72 2c 20 0d | 09 09 09 52 65 73 75 6c |ecPtr, .|...Resul|
|00002460| 74 50 72 6f 63 32 55 50 | 50 20 72 65 73 75 6c 74 |tProc2UP|P result|
|00002470| 50 72 6f 63 2c 20 50 74 | 72 20 75 73 65 72 44 61 |Proc, Pt|r userDa|
|00002480| 74 61 50 74 72 29 0d 7b | 0d 09 69 66 20 28 67 44 |taPtr).{|..if (gD|
|00002490| 4e 52 43 6f 64 65 50 74 | 72 20 3d 3d 20 6e 69 6c |NRCodePt|r == nil|
|000024a0| 29 0d 09 09 2f 2a 20 72 | 65 73 6f 6c 76 65 72 20 |).../* r|esolver |
|000024b0| 6e 6f 74 20 6c 6f 61 64 | 65 64 20 65 72 72 6f 72 |not load|ed error|
|000024c0| 20 2a 2f 0d 09 09 72 65 | 74 75 72 6e 28 6e 6f 74 | */...re|turn(not|
|000024d0| 4f 70 65 6e 45 72 72 29 | 3b 0d 09 09 0d 09 2f 2f |OpenErr)|;.....//|
|000024e0| 20 52 52 4b 20 6d 6f 64 | 69 66 69 63 61 74 69 6f | RRK mod|ificatio|
|000024f0| 6e 20 31 2f 39 35 20 75 | 73 65 20 43 61 6c 6c 48 |n 1/95 u|se CallH|
|00002500| 49 6e 66 6f 50 72 6f 63 | 20 64 65 66 69 6e 65 20 |InfoProc| define |
|00002510| 74 6f 20 63 61 6c 6c 20 | 55 50 50 0d 09 2f 2f 20 |to call |UPP..// |
|00002520| 72 65 74 75 72 6e 28 28 | 2a 64 6e 72 29 28 4d 58 |return((|*dnr)(MX|
|00002530| 49 4e 46 4f 2c 20 68 6f | 73 74 4e 61 6d 65 2c 20 |INFO, ho|stName, |
|00002540| 72 65 74 75 72 6e 52 65 | 63 50 74 72 2c 20 72 65 |returnRe|cPtr, re|
|00002550| 73 75 6c 74 50 72 6f 63 | 2c 20 75 73 65 72 44 61 |sultProc|, userDa|
|00002560| 74 61 50 74 72 29 29 3b | 0d 0d 09 72 65 74 75 72 |taPtr));|...retur|
|00002570| 6e 28 43 61 6c 6c 4d 58 | 49 6e 66 6f 50 72 6f 63 |n(CallMX|InfoProc|
|00002580| 28 67 44 4e 52 43 6f 64 | 65 50 74 72 2c 20 4d 58 |(gDNRCod|ePtr, MX|
|00002590| 49 4e 46 4f 2c 20 68 6f | 73 74 4e 61 6d 65 2c 20 |INFO, ho|stName, |
|000025a0| 72 65 74 75 72 6e 52 65 | 63 50 74 72 2c 20 72 65 |returnRe|cPtr, re|
|000025b0| 73 75 6c 74 50 72 6f 63 | 2c 20 75 73 65 72 44 61 |sultProc|, userDa|
|000025c0| 74 61 50 74 72 29 29 3b | 0d 0d 7d 09 2f 2a 20 72 |taPtr));|..}./* r|
|000025d0| 65 6d 6f 76 65 64 20 3b | 20 28 63 61 75 73 65 73 |emoved ;| (causes|
|000025e0| 20 73 79 6e 74 61 78 20 | 65 72 72 20 69 6e 20 54 | syntax |err in T|
|000025f0| 68 69 6e 6b 20 43 20 35 | 2e 30 20 2a 2f 0d 09 00 |hink C 5|.0 */...|
|00002600| 00 00 01 00 00 00 01 54 | 00 00 00 54 00 00 00 46 |.......T|...T...F|
|00002610| 00 00 e9 cd 0b 70 6d 61 | 70 5f 63 6c 6e 74 2e 63 |.....pma|p_clnt.c|
|00002620| 02 00 00 00 54 45 58 54 | 4d 50 53 20 01 00 00 9c |....TEXT|MPS ....|
|00002630| 0c 64 6e 72 2e 63 20 2d | 20 6f 72 69 67 2d 02 00 |.dnr.c -| orig-..|
|00002640| 00 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......|
|00002650| 00 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......|
|00002660| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002670| 00 00 ab f8 9c 90 00 00 | 00 00 00 00 01 9a 00 00 |........|........|
|00002680| 00 00 00 00 00 00 11 00 | 00 00 e9 cd 0b 70 6d 61 |........|.....pma|
|00002690| 70 5f 63 6c 6e 74 2e 68 | 02 00 00 00 54 45 58 54 |p_clnt.h|....TEXT|
|000026a0| 4d 50 53 20 01 00 00 9c | 01 00 00 00 00 00 e9 e1 |MPS ....|........|
|000026b0| 00 00 00 00 09 cd 00 00 | 10 00 00 00 00 00 00 00 |........|........|
|000026c0| 00 00 00 00 ab 24 a0 34 | ab 24 a0 34 00 00 00 00 |.....$.4|.$.4....|
|000026d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026e0| 00 00 14 93 00 01 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 14 00 |........|........|
|00002700| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 00 |...H..Mo|naco....|
|00002710| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002720| 00 00 00 00 00 00 00 03 | 00 04 00 58 00 04 01 cd |........|...X....|
|00002730| 02 63 00 58 00 04 01 cd | 02 63 ab f7 cf 9d 00 00 |.c.X....|.c......|
|00002740| 0a 78 00 00 0a 78 00 00 | 09 a5 01 00 00 00 00 04 |.x...x..|........|
|00002750| 00 01 00 01 00 00 01 00 | 00 00 01 54 00 00 00 54 |........|...T...T|
|00002760| 00 00 00 46 00 68 5b d8 | 16 0a 00 00 00 1c 00 46 |...F.h[.|.......F|
|00002770| 00 01 4d 50 53 52 00 00 | 00 12 4d 57 42 42 00 00 |..MPSR..|..MWBB..|
|00002780| 00 1e 03 ed ff ff 00 00 | 00 00 00 00 00 00 03 f0 |........|........|
|00002790| ff ff 00 00 00 4c 00 00 | 00 00 00 00 00 00 00 00 |.....L..|........|
|000027a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+